package cn.ittaoli.ajax.utils;

import java.util.List;

/**
 * Created by lub_lenovo on 2017/8/8.
 */
public class Page<T> {
    private Integer pageNum;
    private Integer numPerPage;
    private Integer total;
    private Integer totalPageNum;
    private Integer start;
    private List<T> obj;

    public Integer getStart() {
        return start;
    }

    public Page(Integer pageNum, Integer numPerPage) {
        this.pageNum = pageNum;
        this.numPerPage = numPerPage;
        this.start=(this.pageNum-1)*numPerPage;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getNumPerPage() {
        return numPerPage;
    }

    public void setNumPerPage(Integer numPerPage) {
        this.numPerPage = numPerPage;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Integer getTotalPageNum() {
        return totalPageNum;
    }

    public void setTotalPageNum(Integer totalPageNum) {
        this.totalPageNum = totalPageNum;
    }

    public List<T> getObj() {
        return obj;
    }

    public void setObj(List<T> obj) {
        this.obj = obj;
    }
}
